package service.impl;

import Dao.DeptDao;
import Dao.impl.DeptDaoimpl;
import pojo.Dept;
import service.DeptService;

import java.util.List;

public class DeptServiceimpl implements DeptService {
    static DeptDao DeptDao = new DeptDaoimpl();


    @Override
    public List<Dept> findAll(Dept user) {
        return DeptDao.findAll(user);
    }

    @Override
    public int addDept(Dept dept) {
        return DeptDao.addDept(dept);
    }

    @Override
    public int deleteDept(int id) {
        return DeptDao.deleteDept(id);
    }

   @Override
    public  Dept findDeptById(int id) {
        return DeptDao.findDeptById(id);
    }

    @Override
    public int updateDept(Dept dept) {
        return DeptDao.updateDept(dept);
    }
}
